﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<nelech.Models.DBModel.ForumQuote>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    רשום תגובה
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="HeadContent" runat="server">

    <script src="../../Scripts/tinymce/jscripts/tiny_mce/tiny_mce.js" type="text/javascript"></script>

   <script>

        tinyMCE.init({ theme: "advanced",
            mode: "exact",
            elements: "text",
            plugins: "",
            theme_advanced_buttons1_add_before: "forecolor,backcolor,copy,paste,fontselect", 
            theme_advanced_toolbar_location: "top",
            theme_advanced_toolbar_align: "left",
            theme_advanced_more_colors: true,
            init_instance_callback: "myCustomInitInstance",
            content_css: "/Content/tinymce.css",
            theme_advanced_blockformats: "fff"
        });

        

    </script>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h2>
        רשום תגובה</h2>
    <div>
        <% using (Html.BeginForm("CreateResponse", "Forum",FormMethod.Post, new { enctype = "multipart/form-data" }))
           {%>
        <fieldset>
            <legend>הוסף תגובה</legend>
            <% Response.Write("<input type=\"hidden\" value=\"" + Model.parentRes.ForumCategory.id + "\" name=\"c_id\"/>");%>
            <% Response.Write("<input type=\"hidden\" value=\"" + (Model.parentRes != null ? Model.parentRes.id : Model.subject.id) + "\"  name=\"p_id\">");%>
            
            <% Response.Write("<input type=\"hidden\" value=\"" + Page.User.Identity.Name + "\"  name=\"name\">");%>
            <div>
                
                <p>
                    <label for="title">
                        כותרת:</label>
                    <%= Html.TextBox("title","")%>
                    <%= Html.ValidationMessage("title")%>
                </p>
                 <div>
                   <%= Html.TextArea("text", new {rows="15", cols="7", id="text"})%>
                </div>
                <p>
                <label for="image">העלאת קובץ:</label>
                <input type="file" name="image">
                </p>
                <p>
                <label for="movie">
                    לשבץ סרטון:</label>
                <%= Html.TextBox("movie") %>
               
            </p>
                <div class="floatleft">
                    <span class="feedbackButton">
                        <input type="submit" value="פרסם" /></span> <span class="feedbackCloseButton">
                            <input type="button" value="סגור" onclick="Close()" /></span>
                </div>
            </div>
        </fieldset>
        <%} %>
    </div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="publishTop" runat="server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="Right" runat="server">
</asp:Content>
